﻿namespace HuwmanCode

open System

[<RequireQualifiedAccess>]
module Bool =
    /// Convert a boolean value to an option
    let toOption2 bool =
        match bool with
        | true -> Some()
        | false -> None
    
    /// Convert a boolean value to a value option 
    let toOption value bool =
        match bool with
        | true -> Some(value)
        | false -> None